﻿using System;
using System.Collections.Generic;
using System.Text;
using DepInnerTask.Common.Interface;
using DepInnerTask.Common.Entity;
using IBatisNet.DataMapper;
using Common.Service;
using System.Collections;
using Common.Logging;
using DepInner;
namespace DepInnerTask.Logic
{
    class MessageQueueLogic:IMessageQueue
    {
        public IList GetList(string where, int start, int limit, out int count)
        {
            Hashtable table = new Hashtable();
            table.Add("taskid", "05041162c187f3a8e84ba5df1f54be");
            IList list = DataHelper.Instance().GetList("TaskLogic_GetList", table, start, limit);
            count = list.Count;

            return list;
        }

        public MessageQueueEntity Get(string taskId)
        {
            return DataHelper.Instance().Get<MessageQueueEntity>("TaskLogic_Get", taskId);
        }

        public void Insert(MessageQueueEntity entity)
        {
               DataHelper.Instance().Insert("InsertMessageQueue", entity);
        }

        public void Update(MessageQueueEntity entity)
        {
            DataHelper.Instance().Update("TaskLogic_Update", entity);
        }

        public bool Exists(string taskId)
        {
            throw new NotImplementedException();
        }

        public void Delete(string taskId)
        {
            DataHelper.Instance().Delete("TaskLogic_Delete", taskId);
        }

    }
}
